package com.ghostgraz.unofficial.jhost;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
	private static final Logger log = LoggerFactory.getLogger(App.class);
	private static ApplicationContext context;
	
	public static void main(String[] args) {
		log.info("Starting up!");
		
		String contextFile = "spring/mock.xml";
		
		if(args.length > 1) {
			log.error("Invalid number of arguments!");
		}
		else if(args.length == 1) {
			contextFile = args[0];
		}
		
		context = new ClassPathXmlApplicationContext(contextFile);
	}
}